package org.dromara.exam.domain.entity;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.exam.domain.dto.ProjectSetting;
import org.dromara.exam.domain.dto.TemplateSchema;

import java.io.Serial;

/**
 * 项目对象 exam_project
 *
 * @author xiyin321
 * @date 2024-05-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "exam_project", autoResultMap = true)
public class ExamProject extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 项目ID
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 项目名称
     */
    private String name;

    /**
     * 项目模式
     */
    private TemplateSchema.QuestionType mode;

    /**
     * 内容
     */
    @TableField( typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.LONGVARCHAR)
    private TemplateSchema survey;

    /**
     * 状态
     */
    private String status;

    /**
     * 配置
     */
    @TableField( typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.LONGVARCHAR)
    private ProjectSetting setting;

    /**
     * 删除标志
     */
    @TableLogic
    private String delFlag;

    /**
     * 备注信息
     */
    private String remark;
}
